if [[ "$1" != /* ]]; then
    echo "dist path $1 cannot use relative path use absolute instead"
    exit 1
fi

if [ -d "$1" ]; then
    echo "dist path $1"
else
    echo "dist path $1 not exit, exit"
    exit 1
fi
#docker run --rm -e DISTPATH=/dist/ -e GOPROXY=https://goproxy.cn,direct -v "$PWD":/src -v $1:/dist -w /src golang:1.18 sh buildbinary.sh
bash buildbinary.sh $1
